package com.eastfair.venuebooking.api;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.eastfair.boot.request.PageParams;
import com.eastfair.core.base.R;
import com.eastfair.venueservice.dto.ExhibitionCompanyDTO;
import com.eastfair.venueservice.vo.ExhibitionCompanyVO;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 展会企业 Feign.
 *
 * @author dqq
 * @date 2022 /10/8
 */
@FeignClient("venue-services-manage/exhibitionCompany")
public interface ExhibitionCompanyFeign {

    /**
     * 分页查询展会企业VO.
     *
     * @param pageParams the page params
     * @return the r
     */
    @PostMapping("/query/exhibitionCompany")
    R<Page<ExhibitionCompanyVO>> queryExhibitionCompany(@RequestBody PageParams<ExhibitionCompanyDTO> pageParams);

    /**
     * ID获取展会企业详情.
     *
     * @param id the id
     * @return the by id
     */
    @GetMapping("/get/{id}")
    R<ExhibitionCompanyVO> getById(@PathVariable("id") Long id);

    /**
     * 服务商ID查询展会企业VO.
     *
     * @param serviceProviderId the service provider id
     * @param exhibitionMangeId the exhibition mange id
     * @return the by service provider id
     */
    @GetMapping("/serviceProvider/get")
    R<ExhibitionCompanyVO> getByServiceProviderId(@RequestParam("serviceProviderId") Long serviceProviderId,
                                                  @RequestParam("exhibitionMangeId") Long exhibitionMangeId);

    /**
     * 保存展会企业.
     *
     * @param exhibitionCompanyDTO the exhibition company dto
     * @return the r
     */
    @PostMapping("/save")
    R<Boolean> saveExhibitionCompany(@RequestBody ExhibitionCompanyDTO exhibitionCompanyDTO);

    /**
     * 批量保存展会企业.
     *
     * @param list the list
     * @return the r
     */
    @PostMapping("/save/batch")
    R<Boolean> saveBatch(@RequestBody List<ExhibitionCompanyDTO> list);

    /**
     * 修改展会企业.
     *
     * @param exhibitionCompanyDTO the exhibition company dto
     * @return the r
     */
    @PostMapping("/update")
    R<Boolean> updateExhibitionCompany(@RequestBody ExhibitionCompanyDTO exhibitionCompanyDTO);

    /**
     * id移除展会企业.
     *
     * @param id the id
     * @return the r
     */
    @GetMapping("/remove/{id}")
    R<Boolean> removeById(@PathVariable("id") Long id);

    /**
     * 服务商ID，展会ID删除展会企业.
     *
     * @param exhibitionCompanyDTO the exhibition company dto
     * @return the r
     */
    @ApiOperation("服务商ID，展会ID删除展会企业")
    @GetMapping("/remove/serviceProviderId")
    R<Boolean> removeByServiceProviderId(@RequestBody ExhibitionCompanyDTO exhibitionCompanyDTO);
}